<?php
class photo_index extends SClass {

    public function process() {
        $photoAlbum =Triumph::Get()->getMediaService()->getPhotoAlbumAll();
        $a = array();
        while ($x = $photoAlbum->getNext()) {
            $a[] = array(
                'id' => $x->getId(),
                'name' => $x->getName(),
                'description' => $x->getDescription(),
                'photoArray' => $x->makePhotoArray(8),
                'urlAdd' => Engine::GetLinkMaker()->makeURLByContentIDParam('admin-photo-control', $x->getId())
            );

        }

        $this->setValue('photoalbumArray', $a);
    }

}